/**
 * 
 */
package com.magus.project.yddemo.service;

import java.sql.Date;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.List;

import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.hssf.usermodel.HSSFRichTextString;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.util.CellRangeAddress;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.magus.framework.core.persistence.JpaSearchUtils;
import com.magus.framework.core.persistence.SearchFilter;
import com.magus.framework.core.repository.BaseRepository;
import com.magus.framework.core.service.BaseService;
import com.magus.project.yddemo.entity.IndicatorMapperData;
import com.magus.project.yddemo.entity.IndicatorMapperReport4;
import com.magus.project.yddemo.repository.IndicatorMapperReport4Repository;

/**
 * @author wenyu.han
 * @date 2018-04-04 11:58:21
 */
@Service
@Transactional(readOnly = true)
public class IndicatorMapperReport4Service extends BaseService<IndicatorMapperReport4, String> {

	@Autowired
	private IndicatorMapperReport4Repository reportRepository;

	@Override
	protected BaseRepository<IndicatorMapperReport4, String> getBaseRepository() {
		return reportRepository;
	}

	@Autowired
	private IndicatorMapperDataService mapperDataService;

	// 数据起始行号
	private static final Integer ROW_INDEX = 12;

	/**
	 * 每行的固定列用##符号分开
	 */
	private static final String[] ALL_ROW_NAME = new String[] { "一、6000千瓦及以上电厂合计##01##null", "（一）水电##0101##null",
			"（二）火电##0102##null", "1、燃煤##010201##null", "2、燃气##010202##null", "3、燃油##010203##null", "（三）核电##0103##null",
			"（四）风电##0104##null", "（五）太阳能##0105##null", "二、电厂明细##02##null", "广东粤电新丰江发电有限责任公司##02001##75108654-6",
			"广东粤电枫树坝发电有限责任公司##02002##75105009－2", "广东粤电青溪发电有限责任公司##02003##19642347-7",
			"广东粤电长湖发电有限责任公司##02004##197770796", "广东粤电南水发电有限责任公司##02005##x1746601-8",
			"广东粤电长潭发电有限责任公司##02006##19667395-1", "广东粤电流溪河发电有限责任公司##02007##19033515-0",
			"大埔县梅江蓬辣滩水电站有限公司##02008##73989594-9", "天生桥一级水电开发有限责任公司水力发电厂##02009##73096079-1",
			"临沧粤电能源有限公司塘房电厂##02010##7704814-5", "临沧粤电能源有限公司南荣田电厂##02011##7704814-5",
			"广东电力发展股份有限公司沙角A电厂##02012##73148621-9", "广东粤电集团有限公司沙角C电厂##02013##74369834-X",
			"广东省粤电集团有限公司珠海发电厂##02014##70812907—X", "广东粤华发电有限责任公司##02015##19032084-8", "湛江电力有限公司##02016##23210093-2",
			"广东省韶关粤江发电有限责任公司##02017##70752208-0", "茂名臻能热电有限公司##02018##76656459-8", "广东粤嘉电力有限公司##02019##61741361-4",
			"广东粤电云河发电有限公司##02020##69475944-0", "广东省粤泷发电有限责任公司##02021##61785108-3", "广东珠海金湾发电有限公司##02022##71785911－1",
			"广东红海湾发电有限公司##02023##77307022-X", "广东粤电靖海发电有限公司##02024##76061818-8", "广东惠州平海发电厂有限公司##02025##791172465",
			"贵州粤黔电力有限责任公司##02026##61806419-6", "湛江中粤能源有限公司##02027##74367331-0", "广东粤电大埔发电有限公司##02028##06145024-0",
			"广东惠州天然气发电有限公司##02029##791172465", "深圳市广前电力有限公司##02030##76380066-3", "广东粤电湛江生物质发电有限公司##02031##68056594-4",
			"广东粤电石碑山风能开发有限公司##02032##791172465", "广东粤电湛江风力发电有限公司##02033##79295197-0", "惠来风力发电有限公司##02034##70762183-9",
			"广东粤电电白风力发电有限公司##02035##071911813", "贵州粤电六盘水综合能源有限公司##02036##098548129",
			"贵州粤电遵义风能有限公司仙人山风电场##02037##098956288", "贵州粤电石阡风能有限公司大顶山风电场##02038##085652306",
			"广州开发区粤电新能源有限公司##02039##082711868", "广东粤电阳西新能源有限公司##02040##MA4UM48Y1" };

	/**
	 * 计算厂用电率的发电量-本月
	 */
	private static final String[] JSCYD_FDL_BY_ALL = new String[] { "XFJ_FDL_M_M_M_SUM_M_MANL",
			"FSB_FDL_M_M_M_SUM_M_MANL", "QXH_FDL_M_M_M_SUM_M_MANL", "CHH_FDL_M_M_M_SUM_M_MANL",
			"NSH_FDL_M_M_M_SUM_M_MANL", "CTH_FDL_M_M_M_SUM_M_MANL", "LXH_FDL_M_M_M_SUM_M_MANL",
			"PLT_FDL_M_M_M_SUM_M_MANL", "TSQ_FDL_M_M_M_SUM_M_MANL", "LCC_FDL_M_M_M_SUM_M_MANL", "",
			"SJA_FDL_M_M_M_SUM_M_MANL", "SJC_FDL_M_M_M_SUM_M_MANL", "ZHP_FDL_M_M_M_SUM_M_MANL",
			"HPP_FDL_M_M_M_SUM_M_MANL", "ZJP_FDL_M_M_M_SUM_M_MANL", "SGY_FDL_M_M_M_SUM_M_MANL",
			"MMP_FDL_M_M_M_SUM_M_MANL", "MXP_FDL_M_M_M_SUM_M_MANL", "YHP_FDL_M_M_M_SUM_M_MANL",
			"YLP_FDL_M_M_M_SUM_M_MANL", "JWP_FDL_M_M_M_SUM_M_MANL", "HHW_FDL_M_M_M_SUM_M_MANL",
			"JHP_FDL_M_M_M_SUM_M_MANL", "PHP_FDL_M_M_M_SUM_M_MANL", "GZH_FDL_M_M_M_SUM_M_MANL",
			"TSP_FDL_M_M_M_SUM_M_MANL", "DPP_FDL_M_M_M_SUM_M_MANL", "HZL_FDL_M_M_M_SUM_M_MANL",
			"GQL_FDL_M_M_M_SUM_M_MANL", "SWF_FDL_M_M_M_SUM_M_MANL", "SBS_FDL_M_M_M_SUM_M_MANL",
			"ZJW_FDL_M_M_M_SUM_M_MANL", "HLW_FDL_M_M_M_SUM_M_MANL", "DBW_FDL_M_M_M_SUM_M_MANL",
			"PXW_FDL_M_M_M_SUM_M_MANL", "ZYW_FDL_M_M_M_SUM_M_MANL", "SQW_FDL_M_M_M_SUM_M_MANL",
			"KFE_FDL_M_M_M_SUM_M_MANL", "YXX_FDL_M_M_M_SUM_M_MANL"

	};

	/**
	 * 计算厂用电率的发电量-本月-水电
	 */
	private static final String[] JSCYD_FDL_BY_SD = new String[] { "XFJ_FDL_M_M_M_SUM_M_MANL",
			"FSB_FDL_M_M_M_SUM_M_MANL", "QXH_FDL_M_M_M_SUM_M_MANL", "CHH_FDL_M_M_M_SUM_M_MANL",
			"NSH_FDL_M_M_M_SUM_M_MANL", "CTH_FDL_M_M_M_SUM_M_MANL", "LXH_FDL_M_M_M_SUM_M_MANL",
			"PLT_FDL_M_M_M_SUM_M_MANL", "TSQ_FDL_M_M_M_SUM_M_MANL", "LCC_FDL_M_M_M_SUM_M_MANL", ""

	};

	/**
	 * 计算厂用电率的发电量-本月-火电
	 */
	private static final String[] JSCYD_FDL_BY_HD = new String[] { "SJA_FDL_M_M_M_SUM_M_MANL",
			"SJC_FDL_M_M_M_SUM_M_MANL", "ZHP_FDL_M_M_M_SUM_M_MANL", "HPP_FDL_M_M_M_SUM_M_MANL",
			"ZJP_FDL_M_M_M_SUM_M_MANL", "SGY_FDL_M_M_M_SUM_M_MANL", "MMP_FDL_M_M_M_SUM_M_MANL",
			"MXP_FDL_M_M_M_SUM_M_MANL", "YHP_FDL_M_M_M_SUM_M_MANL", "YLP_FDL_M_M_M_SUM_M_MANL",
			"JWP_FDL_M_M_M_SUM_M_MANL", "HHW_FDL_M_M_M_SUM_M_MANL", "JHP_FDL_M_M_M_SUM_M_MANL",
			"PHP_FDL_M_M_M_SUM_M_MANL", "GZH_FDL_M_M_M_SUM_M_MANL", "TSP_FDL_M_M_M_SUM_M_MANL",
			"DPP_FDL_M_M_M_SUM_M_MANL", "HZL_FDL_M_M_M_SUM_M_MANL", "GQL_FDL_M_M_M_SUM_M_MANL",
			"SWF_FDL_M_M_M_SUM_M_MANL"

	};

	/**
	 * 计算厂用电率的发电量-本月-火电-燃煤
	 */
	private static final String[] JSCYD_FDL_BY_RM = new String[] { "SJA_FDL_M_M_M_SUM_M_MANL",
			"SJC_FDL_M_M_M_SUM_M_MANL", "ZHP_FDL_M_M_M_SUM_M_MANL", "HPP_FDL_M_M_M_SUM_M_MANL",
			"ZJP_FDL_M_M_M_SUM_M_MANL", "SGY_FDL_M_M_M_SUM_M_MANL", "MMP_FDL_M_M_M_SUM_M_MANL",
			"MXP_FDL_M_M_M_SUM_M_MANL", "YHP_FDL_M_M_M_SUM_M_MANL", "YLP_FDL_M_M_M_SUM_M_MANL",
			"JWP_FDL_M_M_M_SUM_M_MANL", "HHW_FDL_M_M_M_SUM_M_MANL", "JHP_FDL_M_M_M_SUM_M_MANL",
			"PHP_FDL_M_M_M_SUM_M_MANL", "GZH_FDL_M_M_M_SUM_M_MANL", "TSP_FDL_M_M_M_SUM_M_MANL",
			"DPP_FDL_M_M_M_SUM_M_MANL"

	};

	/**
	 * 计算厂用电率的发电量-本月-火电-燃气
	 */
	private static final String[] JSCYD_FDL_BY_RQ = new String[] { "HZL_FDL_M_M_M_SUM_M_MANL",
			"GQL_FDL_M_M_M_SUM_M_MANL", "SWF_FDL_M_M_M_SUM_M_MANL"

	};

	/**
	 * 计算厂用电率的发电量-本月-风电
	 */
	private static final String[] JSCYD_FDL_BY_FD = new String[] { "SBS_FDL_M_M_M_SUM_M_MANL",
			"ZJW_FDL_M_M_M_SUM_M_MANL", "HLW_FDL_M_M_M_SUM_M_MANL", "DBW_FDL_M_M_M_SUM_M_MANL",
			"PXW_FDL_M_M_M_SUM_M_MANL", "ZYW_FDL_M_M_M_SUM_M_MANL", "SQW_FDL_M_M_M_SUM_M_MANL"

	};

	/**
	 * 计算厂用电率的发电量-本月-风电
	 */
	private static final String[] JSCYD_FDL_BY_TYN = new String[] { "KFE_FDL_M_M_M_SUM_M_MANL",
			"YXX_FDL_M_M_M_SUM_M_MANL"

	};

	/**
	 * 计算厂用电率的发电量-累计
	 */
	private static final String[] JSCYD_FDL_LJ_ALL = new String[] { "XFJ_FDL_M_M_M_SUM_M_MANL",
			"FSB_FDL_M_M_M_SUM_M_MANL", "QXH_FDL_M_M_M_SUM_M_MANL", "CHH_FDL_M_M_M_SUM_M_MANL",
			"NSH_FDL_M_M_M_SUM_M_MANL", "CTH_FDL_M_M_M_SUM_M_MANL", "LXH_FDL_M_M_M_SUM_M_MANL",
			"PLT_FDL_M_M_M_SUM_M_MANL", "TSQ_FDL_M_M_M_SUM_M_MANL", "LCC_FDL_M_M_M_SUM_M_MANL", "",
			"SJA_FDL_M_M_M_SUM_M_MANL", "SJC_FDL_M_M_M_SUM_M_MANL", "ZHP_FDL_M_M_M_SUM_M_MANL",
			"HPP_FDL_M_M_M_SUM_M_MANL", "ZJP_FDL_M_M_M_SUM_M_MANL", "SGY_FDL_M_M_M_SUM_M_MANL",
			"MMP_FDL_M_M_M_SUM_M_MANL", "MXP_FDL_M_M_M_SUM_M_MANL", "YHP_FDL_M_M_M_SUM_M_MANL",
			"YLP_FDL_M_M_M_SUM_M_MANL", "JWP_FDL_M_M_M_SUM_M_MANL", "HHW_FDL_M_M_M_SUM_M_MANL",
			"JHP_FDL_M_M_M_SUM_M_MANL", "PHP_FDL_M_M_M_SUM_M_MANL", "GZH_FDL_M_M_M_SUM_M_MANL",
			"TSP_FDL_M_M_M_SUM_M_MANL", "DPP_FDL_M_M_M_SUM_M_MANL", "HZL_FDL_M_M_M_SUM_M_MANL",
			"GQL_FDL_M_M_M_SUM_M_MANL", "SWF_FDL_M_M_M_SUM_M_MANL", "SBS_FDL_M_M_M_SUM_M_MANL",
			"ZJW_FDL_M_M_M_SUM_M_MANL", "HLW_FDL_M_M_M_SUM_M_MANL", "DBW_FDL_M_M_M_SUM_M_MANL",
			"PXW_FDL_M_M_M_SUM_M_MANL", "ZYW_FDL_M_M_M_SUM_M_MANL", "SQW_FDL_M_M_M_SUM_M_MANL",
			"KFE_FDL_M_M_M_SUM_M_MANL", "YXX_FDL_M_M_M_SUM_M_MANL"

	};

	/**
	 * 计算厂用电率的发电量-累计-水电
	 */
	private static final String[] JSCYD_FDL_LJ_SD = new String[] { "XFJ_FDL_M_M_M_SUM_M_MANL",
			"FSB_FDL_M_M_M_SUM_M_MANL", "QXH_FDL_M_M_M_SUM_M_MANL", "CHH_FDL_M_M_M_SUM_M_MANL",
			"NSH_FDL_M_M_M_SUM_M_MANL", "CTH_FDL_M_M_M_SUM_M_MANL", "LXH_FDL_M_M_M_SUM_M_MANL",
			"PLT_FDL_M_M_M_SUM_M_MANL", "TSQ_FDL_M_M_M_SUM_M_MANL", "LCC_FDL_M_M_M_SUM_M_MANL", ""

	};

	/**
	 * 计算厂用电率的发电量-累计-火电
	 */
	private static final String[] JSCYD_FDL_LJ_HD = new String[] { "SJA_FDL_M_M_M_SUM_M_MANL",
			"SJC_FDL_M_M_M_SUM_M_MANL", "ZHP_FDL_M_M_M_SUM_M_MANL", "HPP_FDL_M_M_M_SUM_M_MANL",
			"ZJP_FDL_M_M_M_SUM_M_MANL", "SGY_FDL_M_M_M_SUM_M_MANL", "MMP_FDL_M_M_M_SUM_M_MANL",
			"MXP_FDL_M_M_M_SUM_M_MANL", "YHP_FDL_M_M_M_SUM_M_MANL", "YLP_FDL_M_M_M_SUM_M_MANL",
			"JWP_FDL_M_M_M_SUM_M_MANL", "HHW_FDL_M_M_M_SUM_M_MANL", "JHP_FDL_M_M_M_SUM_M_MANL",
			"PHP_FDL_M_M_M_SUM_M_MANL", "GZH_FDL_M_M_M_SUM_M_MANL", "TSP_FDL_M_M_M_SUM_M_MANL",
			"DPP_FDL_M_M_M_SUM_M_MANL", "HZL_FDL_M_M_M_SUM_M_MANL", "GQL_FDL_M_M_M_SUM_M_MANL",
			"SWF_FDL_M_M_M_SUM_M_MANL"

	};

	/**
	 * 计算厂用电率的发电量-累计-火电-燃煤
	 */
	private static final String[] JSCYD_FDL_LJ_RM = new String[] { "SJA_FDL_M_M_M_SUM_M_MANL",
			"SJC_FDL_M_M_M_SUM_M_MANL", "ZHP_FDL_M_M_M_SUM_M_MANL", "HPP_FDL_M_M_M_SUM_M_MANL",
			"ZJP_FDL_M_M_M_SUM_M_MANL", "SGY_FDL_M_M_M_SUM_M_MANL", "MMP_FDL_M_M_M_SUM_M_MANL",
			"MXP_FDL_M_M_M_SUM_M_MANL", "YHP_FDL_M_M_M_SUM_M_MANL", "YLP_FDL_M_M_M_SUM_M_MANL",
			"JWP_FDL_M_M_M_SUM_M_MANL", "HHW_FDL_M_M_M_SUM_M_MANL", "JHP_FDL_M_M_M_SUM_M_MANL",
			"PHP_FDL_M_M_M_SUM_M_MANL", "GZH_FDL_M_M_M_SUM_M_MANL", "TSP_FDL_M_M_M_SUM_M_MANL",
			"DPP_FDL_M_M_M_SUM_M_MANL"

	};

	/**
	 * 计算厂用电率的发电量-累计-火电-燃气
	 */
	private static final String[] JSCYD_FDL_LJ_RQ = new String[] { "HZL_FDL_M_M_M_SUM_M_MANL",
			"GQL_FDL_M_M_M_SUM_M_MANL", "SWF_FDL_M_M_M_SUM_M_MANL"

	};

	/**
	 * 计算厂用电率的发电量-累计-风电
	 */
	private static final String[] JSCYD_FDL_LJ_FD = new String[] { "SBS_FDL_M_M_M_SUM_M_MANL",
			"ZJW_FDL_M_M_M_SUM_M_MANL", "HLW_FDL_M_M_M_SUM_M_MANL", "DBW_FDL_M_M_M_SUM_M_MANL",
			"PXW_FDL_M_M_M_SUM_M_MANL", "ZYW_FDL_M_M_M_SUM_M_MANL", "SQW_FDL_M_M_M_SUM_M_MANL" };

	/**
	 * 计算厂用电率的发电量-累计-太阳能
	 */
	private static final String[] JSCYD_FDL_LJ_TYN = new String[] { "KFE_FDL_M_M_M_SUM_M_MANL",
			"YXX_FDL_M_M_M_SUM_M_MANL" };

	/**
	 * 电厂生产全部耗用电量-本月
	 */
	private static final String[] SWDL_BY_ALL = new String[] { "XFJ_SWDL_M_M_M_SUM_M_MANL", "FSB_SWDL_M_M_M_SUM_M_MANL",
			"QXH_SWDL_M_M_M_SUM_M_MANL", "CHH_SWDL_M_M_M_SUM_M_MANL", "NSH_SWDL_M_M_M_SUM_M_MANL",
			"CTH_SWDL_M_M_M_SUM_M_MANL", "LXH_SWDL_M_M_M_SUM_M_MANL", "PLT_SWDL_M_M_M_SUM_M_MANL",
			"TSQ_SWDL_M_M_M_SUM_M_MANL", "LCC_SWDL_M_M_M_SUM_M_MANL", "", "SJA_SWDL_M_M_M_SUM_M_MANL",
			"SJC_SWDL_M_M_M_SUM_M_MANL", "ZHP_SWDL_M_M_M_SUM_M_MANL", "HPP_SWDL_M_M_M_SUM_M_MANL",
			"ZJP_SWDL_M_M_M_SUM_M_MANL", "SGY_SWDL_M_M_M_SUM_M_MANL", "MMP_SWDL_M_M_M_SUM_M_MANL",
			"MXP_SWDL_M_M_M_SUM_M_MANL", "YHP_SWDL_M_M_M_SUM_M_MANL", "YLP_SWDL_M_M_M_SUM_M_MANL",
			"JWP_SWDL_M_M_M_SUM_M_MANL", "HHW_SWDL_M_M_M_SUM_M_MANL", "JHP_SWDL_M_M_M_SUM_M_MANL",
			"PHP_SWDL_M_M_M_SUM_M_MANL", "GZH_SWDL_M_M_M_SUM_M_MANL", "TSP_SWDL_M_M_M_SUM_M_MANL",
			"DPP_SWDL_M_M_M_SUM_M_MANL", "HZL_SWDL_M_M_M_SUM_M_MANL", "GQL_SWDL_M_M_M_SUM_M_MANL",
			"SWF_SWDL_M_M_M_SUM_M_MANL", "SBS_SWDL_M_M_M_SUM_M_MANL", "ZJW_SWDL_M_M_M_SUM_M_MANL",
			"HLW_SWDL_M_M_M_SUM_M_MANL", "DBW_SWDL_M_M_M_SUM_M_MANL", "PXW_SWDL_M_M_M_SUM_M_MANL",
			"ZYW_SWDL_M_M_M_SUM_M_MANL", "SQW_SWDL_M_M_M_SUM_M_MANL", "KFE_SWDL_M_M_M_SUM_M_MANL",
			"YXX_SWDL_M_M_M_SUM_M_MANL"

	};

	/**
	 * 电厂生产全部耗用电量-本月-水电
	 */
	private static final String[] SWDL_BY_SD = new String[] { "XFJ_SWDL_M_M_M_SUM_M_MANL", "FSB_SWDL_M_M_M_SUM_M_MANL",
			"QXH_SWDL_M_M_M_SUM_M_MANL", "CHH_SWDL_M_M_M_SUM_M_MANL", "NSH_SWDL_M_M_M_SUM_M_MANL",
			"CTH_SWDL_M_M_M_SUM_M_MANL", "LXH_SWDL_M_M_M_SUM_M_MANL", "PLT_SWDL_M_M_M_SUM_M_MANL",
			"TSQ_SWDL_M_M_M_SUM_M_MANL", "LCC_SWDL_M_M_M_SUM_M_MANL", "" };

	/**
	 * 电厂生产全部耗用电量-本月-火电
	 */
	private static final String[] SWDL_BY_HD = new String[] { "SJA_SWDL_M_M_M_SUM_M_MANL", "SJC_SWDL_M_M_M_SUM_M_MANL",
			"ZHP_SWDL_M_M_M_SUM_M_MANL", "HPP_SWDL_M_M_M_SUM_M_MANL", "ZJP_SWDL_M_M_M_SUM_M_MANL",
			"SGY_SWDL_M_M_M_SUM_M_MANL", "MMP_SWDL_M_M_M_SUM_M_MANL", "MXP_SWDL_M_M_M_SUM_M_MANL",
			"YHP_SWDL_M_M_M_SUM_M_MANL", "YLP_SWDL_M_M_M_SUM_M_MANL", "JWP_SWDL_M_M_M_SUM_M_MANL",
			"HHW_SWDL_M_M_M_SUM_M_MANL", "JHP_SWDL_M_M_M_SUM_M_MANL", "PHP_SWDL_M_M_M_SUM_M_MANL",
			"GZH_SWDL_M_M_M_SUM_M_MANL", "TSP_SWDL_M_M_M_SUM_M_MANL", "DPP_SWDL_M_M_M_SUM_M_MANL",
			"HZL_SWDL_M_M_M_SUM_M_MANL", "GQL_SWDL_M_M_M_SUM_M_MANL", "SWF_SWDL_M_M_M_SUM_M_MANL" };

	/**
	 * 电厂生产全部耗用电量-本月-火电-燃煤
	 */
	private static final String[] SWDL_BY_RM = new String[] { "SJA_SWDL_M_M_M_SUM_M_MANL", "SJC_SWDL_M_M_M_SUM_M_MANL",
			"ZHP_SWDL_M_M_M_SUM_M_MANL", "HPP_SWDL_M_M_M_SUM_M_MANL", "ZJP_SWDL_M_M_M_SUM_M_MANL",
			"SGY_SWDL_M_M_M_SUM_M_MANL", "MMP_SWDL_M_M_M_SUM_M_MANL", "MXP_SWDL_M_M_M_SUM_M_MANL",
			"YHP_SWDL_M_M_M_SUM_M_MANL", "YLP_SWDL_M_M_M_SUM_M_MANL", "JWP_SWDL_M_M_M_SUM_M_MANL",
			"HHW_SWDL_M_M_M_SUM_M_MANL", "JHP_SWDL_M_M_M_SUM_M_MANL", "PHP_SWDL_M_M_M_SUM_M_MANL",
			"GZH_SWDL_M_M_M_SUM_M_MANL", "TSP_SWDL_M_M_M_SUM_M_MANL", "DPP_SWDL_M_M_M_SUM_M_MANL" };

	/**
	 * 电厂生产全部耗用电量-本月-火电-燃气
	 */
	private static final String[] SWDL_BY_RQ = new String[] { "HZL_SWDL_M_M_M_SUM_M_MANL", "GQL_SWDL_M_M_M_SUM_M_MANL",
			"SWF_SWDL_M_M_M_SUM_M_MANL" };

	/**
	 * 电厂生产全部耗用电量-本月-风电
	 */
	private static final String[] SWDL_BY_FD = new String[] { "SBS_SWDL_M_M_M_SUM_M_MANL", "ZJW_SWDL_M_M_M_SUM_M_MANL",
			"HLW_SWDL_M_M_M_SUM_M_MANL", "DBW_SWDL_M_M_M_SUM_M_MANL", "PXW_SWDL_M_M_M_SUM_M_MANL",
			"ZYW_SWDL_M_M_M_SUM_M_MANL", "SQW_SWDL_M_M_M_SUM_M_MANL" };

	/**
	 * 电厂生产全部耗用电量-本月-太阳能
	 */
	private static final String[] SWDL_BY_TYN = new String[] { "KFE_SWDL_M_M_M_SUM_M_MANL",
			"YXX_SWDL_M_M_M_SUM_M_MANL" };

	/**
	 * 电厂生产全部耗用电量-累计
	 */
	private static final String[] SWDL_LJ_ALL = new String[] { "XFJ_SWDL_M_M_M_SUM_M_MANL", "FSB_SWDL_M_M_M_SUM_M_MANL",
			"QXH_SWDL_M_M_M_SUM_M_MANL", "CHH_SWDL_M_M_M_SUM_M_MANL", "NSH_SWDL_M_M_M_SUM_M_MANL",
			"CTH_SWDL_M_M_M_SUM_M_MANL", "LXH_SWDL_M_M_M_SUM_M_MANL", "PLT_SWDL_M_M_M_SUM_M_MANL",
			"TSQ_SWDL_M_M_M_SUM_M_MANL", "LCC_SWDL_M_M_M_SUM_M_MANL", "", "SJA_SWDL_M_M_M_SUM_M_MANL",
			"SJC_SWDL_M_M_M_SUM_M_MANL", "ZHP_SWDL_M_M_M_SUM_M_MANL", "HPP_SWDL_M_M_M_SUM_M_MANL",
			"ZJP_SWDL_M_M_M_SUM_M_MANL", "SGY_SWDL_M_M_M_SUM_M_MANL", "MMP_SWDL_M_M_M_SUM_M_MANL",
			"MXP_SWDL_M_M_M_SUM_M_MANL", "YHP_SWDL_M_M_M_SUM_M_MANL", "YLP_SWDL_M_M_M_SUM_M_MANL",
			"JWP_SWDL_M_M_M_SUM_M_MANL", "HHW_SWDL_M_M_M_SUM_M_MANL", "JHP_SWDL_M_M_M_SUM_M_MANL",
			"PHP_SWDL_M_M_M_SUM_M_MANL", "GZH_SWDL_M_M_M_SUM_M_MANL", "TSP_SWDL_M_M_M_SUM_M_MANL",
			"DPP_SWDL_M_M_M_SUM_M_MANL", "HZL_SWDL_M_M_M_SUM_M_MANL", "GQL_SWDL_M_M_M_SUM_M_MANL",
			"SWF_SWDL_M_M_M_SUM_M_MANL", "SBS_SWDL_M_M_M_SUM_M_MANL", "ZJW_SWDL_M_M_M_SUM_M_MANL",
			"HLW_SWDL_M_M_M_SUM_M_MANL", "DBW_SWDL_M_M_M_SUM_M_MANL", "PXW_SWDL_M_M_M_SUM_M_MANL",
			"ZYW_SWDL_M_M_M_SUM_M_MANL", "SQW_SWDL_M_M_M_SUM_M_MANL", "KFE_SWDL_M_M_M_SUM_M_MANL",
			"YXX_SWDL_M_M_M_SUM_M_MANL" };

	/**
	 * 电厂生产全部耗用电量-累计-水电
	 */
	private static final String[] SWDL_LJ_SD = new String[] { "XFJ_SWDL_M_M_M_SUM_M_MANL", "FSB_SWDL_M_M_M_SUM_M_MANL",
			"QXH_SWDL_M_M_M_SUM_M_MANL", "CHH_SWDL_M_M_M_SUM_M_MANL", "NSH_SWDL_M_M_M_SUM_M_MANL",
			"CTH_SWDL_M_M_M_SUM_M_MANL", "LXH_SWDL_M_M_M_SUM_M_MANL", "PLT_SWDL_M_M_M_SUM_M_MANL",
			"TSQ_SWDL_M_M_M_SUM_M_MANL", "LCC_SWDL_M_M_M_SUM_M_MANL", "" };

	/**
	 * 电厂生产全部耗用电量-累计-火电
	 */
	private static final String[] SWDL_LJ_HD = new String[] { "SJA_SWDL_M_M_M_SUM_M_MANL", "SJC_SWDL_M_M_M_SUM_M_MANL",
			"ZHP_SWDL_M_M_M_SUM_M_MANL", "HPP_SWDL_M_M_M_SUM_M_MANL", "ZJP_SWDL_M_M_M_SUM_M_MANL",
			"SGY_SWDL_M_M_M_SUM_M_MANL", "MMP_SWDL_M_M_M_SUM_M_MANL", "MXP_SWDL_M_M_M_SUM_M_MANL",
			"YHP_SWDL_M_M_M_SUM_M_MANL", "YLP_SWDL_M_M_M_SUM_M_MANL", "JWP_SWDL_M_M_M_SUM_M_MANL",
			"HHW_SWDL_M_M_M_SUM_M_MANL", "JHP_SWDL_M_M_M_SUM_M_MANL", "PHP_SWDL_M_M_M_SUM_M_MANL",
			"GZH_SWDL_M_M_M_SUM_M_MANL", "TSP_SWDL_M_M_M_SUM_M_MANL", "DPP_SWDL_M_M_M_SUM_M_MANL",
			"HZL_SWDL_M_M_M_SUM_M_MANL", "GQL_SWDL_M_M_M_SUM_M_MANL", "SWF_SWDL_M_M_M_SUM_M_MANL" };

	/**
	 * 电厂生产全部耗用电量-累计-火电-燃煤
	 */
	private static final String[] SWDL_LJ_RM = new String[] { "SJA_SWDL_M_M_M_SUM_M_MANL", "SJC_SWDL_M_M_M_SUM_M_MANL",
			"ZHP_SWDL_M_M_M_SUM_M_MANL", "HPP_SWDL_M_M_M_SUM_M_MANL", "ZJP_SWDL_M_M_M_SUM_M_MANL",
			"SGY_SWDL_M_M_M_SUM_M_MANL", "MMP_SWDL_M_M_M_SUM_M_MANL", "MXP_SWDL_M_M_M_SUM_M_MANL",
			"YHP_SWDL_M_M_M_SUM_M_MANL", "YLP_SWDL_M_M_M_SUM_M_MANL", "JWP_SWDL_M_M_M_SUM_M_MANL",
			"HHW_SWDL_M_M_M_SUM_M_MANL", "JHP_SWDL_M_M_M_SUM_M_MANL", "PHP_SWDL_M_M_M_SUM_M_MANL",
			"GZH_SWDL_M_M_M_SUM_M_MANL", "TSP_SWDL_M_M_M_SUM_M_MANL", "DPP_SWDL_M_M_M_SUM_M_MANL" };

	/**
	 * 电厂生产全部耗用电量-累计-火电-燃气
	 */
	private static final String[] SWDL_LJ_RQ = new String[] { "HZL_SWDL_M_M_M_SUM_M_MANL", "GQL_SWDL_M_M_M_SUM_M_MANL",
			"SWF_SWDL_M_M_M_SUM_M_MANL" };

	/**
	 * 电厂生产全部耗用电量-累计-风电
	 */
	private static final String[] SWDL_LJ_FD = new String[] { "SBS_SWDL_M_M_M_SUM_M_MANL", "ZJW_SWDL_M_M_M_SUM_M_MANL",
			"HLW_SWDL_M_M_M_SUM_M_MANL", "DBW_SWDL_M_M_M_SUM_M_MANL", "PXW_SWDL_M_M_M_SUM_M_MANL",
			"ZYW_SWDL_M_M_M_SUM_M_MANL", "SQW_SWDL_M_M_M_SUM_M_MANL" };

	/**
	 * 电厂生产全部耗用电量-累计-太阳能
	 */
	private static final String[] SWDL_LJ_TYN = new String[] { "KFE_SWDL_M_M_M_SUM_M_MANL",
			"YXX_SWDL_M_M_M_SUM_M_MANL" };

	/**
	 * 其中：发电厂用电量-本月
	 */
	private static final String[] FDCYDL_BY_ALL = new String[] { "XFJ_SCCYDL_M_M_M_SUM_M_MANL",
			"FSB_SCCYDL_M_M_M_SUM_M_MANL", "QXH_SCCYDL_M_M_M_SUM_M_MANL", "CHH_SCCYDL_M_M_M_SUM_M_MANL",
			"NSH_SCCYDL_M_M_M_SUM_M_MANL", "CTH_SCCYDL_M_M_M_SUM_M_MANL", "LXH_SCCYDL_M_M_M_SUM_M_MANL",
			"PLT_SCCYDL_M_M_M_SUM_M_MANL", "TSQ_SCCYDL_M_M_M_SUM_M_MANL", "LCC_SCCYDL_M_M_M_SUM_M_MANL", "",
			"SJA_SCCYDL_M_M_M_SUM_M_MANL", "SJC_SCCYDL_M_M_M_SUM_M_MANL", "ZHP_SCCYDL_M_M_M_SUM_M_MANL",
			"HPP_SCCYDL_M_M_M_SUM_M_MANL", "ZJP_SCCYDL_M_M_M_SUM_M_MANL", "SGY_SCCYDL_M_M_M_SUM_M_MANL",
			"MMP_SCCYDL_M_M_M_SUM_M_MANL", "MXP_SCCYDL_M_M_M_SUM_M_MANL", "YHP_SCCYDL_M_M_M_SUM_M_MANL",
			"YLP_SCCYDL_M_M_M_SUM_M_MANL", "JWP_SCCYDL_M_M_M_SUM_M_MANL", "HHW_SCCYDL_M_M_M_SUM_M_MANL",
			"JHP_SCCYDL_M_M_M_SUM_M_MANL", "PHP_SCCYDL_M_M_M_SUM_M_MANL", "GZH_SCCYDL_M_M_M_SUM_M_MANL",
			"TSP_SCCYDL_M_M_M_SUM_M_MANL", "DPP_SCCYDL_M_M_M_SUM_M_MANL", "HZL_SCCYDL_M_M_M_SUM_M_MANL",
			"GQL_SCCYDL_M_M_M_SUM_M_MANL", "SWF_SCCYDL_M_M_M_SUM_M_MANL", "SBS_SCCYDL_M_M_M_SUM_M_MANL",
			"ZJW_SCCYDL_M_M_M_SUM_M_MANL", "HLW_SCCYDL_M_M_M_SUM_M_MANL", "DBW_SCCYDL_M_M_M_SUM_M_MANL",
			"PXW_SCCYDL_M_M_M_SUM_M_MANL", "ZYW_SCCYDL_M_M_M_SUM_M_MANL", "SQW_SCCYDL_M_M_M_SUM_M_MANL",
			"KFE_SCCYDL_M_M_M_SUM_M_MANL", "YXX_SCCYDL_M_M_M_SUM_M_MANL"

	};

	/**
	 * 其中：发电厂用电量-本月-水电
	 */
	private static final String[] FDCYDL_BY_SD = new String[] { "XFJ_SCCYDL_M_M_M_SUM_M_MANL",
			"FSB_SCCYDL_M_M_M_SUM_M_MANL", "QXH_SCCYDL_M_M_M_SUM_M_MANL", "CHH_SCCYDL_M_M_M_SUM_M_MANL",
			"NSH_SCCYDL_M_M_M_SUM_M_MANL", "CTH_SCCYDL_M_M_M_SUM_M_MANL", "LXH_SCCYDL_M_M_M_SUM_M_MANL",
			"PLT_SCCYDL_M_M_M_SUM_M_MANL", "TSQ_SCCYDL_M_M_M_SUM_M_MANL", "LCC_SCCYDL_M_M_M_SUM_M_MANL", "" };

	/**
	 * 其中：发电厂用电量-本月-火电
	 */
	private static final String[] FDCYDL_BY_HD = new String[] { "SJA_SCCYDL_M_M_M_SUM_M_MANL",
			"SJC_SCCYDL_M_M_M_SUM_M_MANL", "ZHP_SCCYDL_M_M_M_SUM_M_MANL", "HPP_SCCYDL_M_M_M_SUM_M_MANL",
			"ZJP_SCCYDL_M_M_M_SUM_M_MANL", "SGY_SCCYDL_M_M_M_SUM_M_MANL", "MMP_SCCYDL_M_M_M_SUM_M_MANL",
			"MXP_SCCYDL_M_M_M_SUM_M_MANL", "YHP_SCCYDL_M_M_M_SUM_M_MANL", "YLP_SCCYDL_M_M_M_SUM_M_MANL",
			"JWP_SCCYDL_M_M_M_SUM_M_MANL", "HHW_SCCYDL_M_M_M_SUM_M_MANL", "JHP_SCCYDL_M_M_M_SUM_M_MANL",
			"PHP_SCCYDL_M_M_M_SUM_M_MANL", "GZH_SCCYDL_M_M_M_SUM_M_MANL", "TSP_SCCYDL_M_M_M_SUM_M_MANL",
			"DPP_SCCYDL_M_M_M_SUM_M_MANL", "HZL_SCCYDL_M_M_M_SUM_M_MANL", "GQL_SCCYDL_M_M_M_SUM_M_MANL",
			"SWF_SCCYDL_M_M_M_SUM_M_MANL" };

	/**
	 * 其中：发电厂用电量-本月-火电-燃煤
	 */
	private static final String[] FDCYDL_BY_RM = new String[] { "SJA_SCCYDL_M_M_M_SUM_M_MANL",
			"SJC_SCCYDL_M_M_M_SUM_M_MANL", "ZHP_SCCYDL_M_M_M_SUM_M_MANL", "HPP_SCCYDL_M_M_M_SUM_M_MANL",
			"ZJP_SCCYDL_M_M_M_SUM_M_MANL", "SGY_SCCYDL_M_M_M_SUM_M_MANL", "MMP_SCCYDL_M_M_M_SUM_M_MANL",
			"MXP_SCCYDL_M_M_M_SUM_M_MANL", "YHP_SCCYDL_M_M_M_SUM_M_MANL", "YLP_SCCYDL_M_M_M_SUM_M_MANL",
			"JWP_SCCYDL_M_M_M_SUM_M_MANL", "HHW_SCCYDL_M_M_M_SUM_M_MANL", "JHP_SCCYDL_M_M_M_SUM_M_MANL",
			"PHP_SCCYDL_M_M_M_SUM_M_MANL", "GZH_SCCYDL_M_M_M_SUM_M_MANL", "TSP_SCCYDL_M_M_M_SUM_M_MANL",
			"DPP_SCCYDL_M_M_M_SUM_M_MANL" };

	/**
	 * 其中：发电厂用电量-本月-火电-燃气
	 */
	private static final String[] FDCYDL_BY_RQ = new String[] { "HZL_SCCYDL_M_M_M_SUM_M_MANL",
			"GQL_SCCYDL_M_M_M_SUM_M_MANL", "SWF_SCCYDL_M_M_M_SUM_M_MANL" };

	/**
	 * 其中：发电厂用电量-本月-风电
	 */
	private static final String[] FDCYDL_BY_FD = new String[] { "SBS_SCCYDL_M_M_M_SUM_M_MANL",
			"ZJW_SCCYDL_M_M_M_SUM_M_MANL", "HLW_SCCYDL_M_M_M_SUM_M_MANL", "DBW_SCCYDL_M_M_M_SUM_M_MANL",
			"PXW_SCCYDL_M_M_M_SUM_M_MANL", "ZYW_SCCYDL_M_M_M_SUM_M_MANL", "SQW_SCCYDL_M_M_M_SUM_M_MANL" };

	/**
	 * 其中：发电厂用电量-本月-太阳能
	 */
	private static final String[] FDCYDL_BY_TYN = new String[] { "KFE_SCCYDL_M_M_M_SUM_M_MANL",
			"YXX_SCCYDL_M_M_M_SUM_M_MANL" };

	/**
	 * 其中：发电厂用电量-累计
	 */
	private static final String[] FDCYDL_LJ_ALL = new String[] { "XFJ_SCCYDL_M_M_M_SUM_M_MANL",
			"FSB_SCCYDL_M_M_M_SUM_M_MANL", "QXH_SCCYDL_M_M_M_SUM_M_MANL", "CHH_SCCYDL_M_M_M_SUM_M_MANL",
			"NSH_SCCYDL_M_M_M_SUM_M_MANL", "CTH_SCCYDL_M_M_M_SUM_M_MANL", "LXH_SCCYDL_M_M_M_SUM_M_MANL",
			"PLT_SCCYDL_M_M_M_SUM_M_MANL", "TSQ_SCCYDL_M_M_M_SUM_M_MANL", "LCC_SCCYDL_M_M_M_SUM_M_MANL", "",
			"SJA_SCCYDL_M_M_M_SUM_M_MANL", "SJC_SCCYDL_M_M_M_SUM_M_MANL", "ZHP_SCCYDL_M_M_M_SUM_M_MANL",
			"HPP_SCCYDL_M_M_M_SUM_M_MANL", "ZJP_SCCYDL_M_M_M_SUM_M_MANL", "SGY_SCCYDL_M_M_M_SUM_M_MANL",
			"MMP_SCCYDL_M_M_M_SUM_M_MANL", "MXP_SCCYDL_M_M_M_SUM_M_MANL", "YHP_SCCYDL_M_M_M_SUM_M_MANL",
			"YLP_SCCYDL_M_M_M_SUM_M_MANL", "JWP_SCCYDL_M_M_M_SUM_M_MANL", "HHW_SCCYDL_M_M_M_SUM_M_MANL",
			"JHP_SCCYDL_M_M_M_SUM_M_MANL", "PHP_SCCYDL_M_M_M_SUM_M_MANL", "GZH_SCCYDL_M_M_M_SUM_M_MANL",
			"TSP_SCCYDL_M_M_M_SUM_M_MANL", "DPP_SCCYDL_M_M_M_SUM_M_MANL", "HZL_SCCYDL_M_M_M_SUM_M_MANL",
			"GQL_SCCYDL_M_M_M_SUM_M_MANL", "SWF_SCCYDL_M_M_M_SUM_M_MANL", "SBS_SCCYDL_M_M_M_SUM_M_MANL",
			"ZJW_SCCYDL_M_M_M_SUM_M_MANL", "HLW_SCCYDL_M_M_M_SUM_M_MANL", "DBW_SCCYDL_M_M_M_SUM_M_MANL",
			"PXW_SCCYDL_M_M_M_SUM_M_MANL", "ZYW_SCCYDL_M_M_M_SUM_M_MANL", "SQW_SCCYDL_M_M_M_SUM_M_MANL",
			"KFE_SCCYDL_M_M_M_SUM_M_MANL", "YXX_SCCYDL_M_M_M_SUM_M_MANL"

	};

	/**
	 * 其中：发电厂用电量-累计-水电
	 */
	private static final String[] FDCYDL_LJ_SD = new String[] { "XFJ_SCCYDL_M_M_M_SUM_M_MANL",
			"FSB_SCCYDL_M_M_M_SUM_M_MANL", "QXH_SCCYDL_M_M_M_SUM_M_MANL", "CHH_SCCYDL_M_M_M_SUM_M_MANL",
			"NSH_SCCYDL_M_M_M_SUM_M_MANL", "CTH_SCCYDL_M_M_M_SUM_M_MANL", "LXH_SCCYDL_M_M_M_SUM_M_MANL",
			"PLT_SCCYDL_M_M_M_SUM_M_MANL", "TSQ_SCCYDL_M_M_M_SUM_M_MANL", "LCC_SCCYDL_M_M_M_SUM_M_MANL", "" };

	/**
	 * 其中：发电厂用电量-累计-火电
	 */
	private static final String[] FDCYDL_LJ_HD = new String[] { "SJA_SCCYDL_M_M_M_SUM_M_MANL",
			"SJC_SCCYDL_M_M_M_SUM_M_MANL", "ZHP_SCCYDL_M_M_M_SUM_M_MANL", "HPP_SCCYDL_M_M_M_SUM_M_MANL",
			"ZJP_SCCYDL_M_M_M_SUM_M_MANL", "SGY_SCCYDL_M_M_M_SUM_M_MANL", "MMP_SCCYDL_M_M_M_SUM_M_MANL",
			"MXP_SCCYDL_M_M_M_SUM_M_MANL", "YHP_SCCYDL_M_M_M_SUM_M_MANL", "YLP_SCCYDL_M_M_M_SUM_M_MANL",
			"JWP_SCCYDL_M_M_M_SUM_M_MANL", "HHW_SCCYDL_M_M_M_SUM_M_MANL", "JHP_SCCYDL_M_M_M_SUM_M_MANL",
			"PHP_SCCYDL_M_M_M_SUM_M_MANL", "GZH_SCCYDL_M_M_M_SUM_M_MANL", "TSP_SCCYDL_M_M_M_SUM_M_MANL",
			"DPP_SCCYDL_M_M_M_SUM_M_MANL", "HZL_SCCYDL_M_M_M_SUM_M_MANL", "GQL_SCCYDL_M_M_M_SUM_M_MANL",
			"SWF_SCCYDL_M_M_M_SUM_M_MANL" };

	/**
	 * 其中：发电厂用电量-累计-火电-燃煤
	 */
	private static final String[] FDCYDL_LJ_RM = new String[] { "SJA_SCCYDL_M_M_M_SUM_M_MANL",
			"SJC_SCCYDL_M_M_M_SUM_M_MANL", "ZHP_SCCYDL_M_M_M_SUM_M_MANL", "HPP_SCCYDL_M_M_M_SUM_M_MANL",
			"ZJP_SCCYDL_M_M_M_SUM_M_MANL", "SGY_SCCYDL_M_M_M_SUM_M_MANL", "MMP_SCCYDL_M_M_M_SUM_M_MANL",
			"MXP_SCCYDL_M_M_M_SUM_M_MANL", "YHP_SCCYDL_M_M_M_SUM_M_MANL", "YLP_SCCYDL_M_M_M_SUM_M_MANL",
			"JWP_SCCYDL_M_M_M_SUM_M_MANL", "HHW_SCCYDL_M_M_M_SUM_M_MANL", "JHP_SCCYDL_M_M_M_SUM_M_MANL",
			"PHP_SCCYDL_M_M_M_SUM_M_MANL", "GZH_SCCYDL_M_M_M_SUM_M_MANL", "TSP_SCCYDL_M_M_M_SUM_M_MANL",
			"DPP_SCCYDL_M_M_M_SUM_M_MANL" };

	/**
	 * 其中：发电厂用电量-累计-火电-燃气
	 */
	private static final String[] FDCYDL_LJ_RQ = new String[] { "HZL_SCCYDL_M_M_M_SUM_M_MANL",
			"GQL_SCCYDL_M_M_M_SUM_M_MANL", "SWF_SCCYDL_M_M_M_SUM_M_MANL" };

	/**
	 * 其中：发电厂用电量-累计-风电
	 */
	private static final String[] FDCYDL_LJ_FD = new String[] { "SBS_SCCYDL_M_M_M_SUM_M_MANL",
			"ZJW_SCCYDL_M_M_M_SUM_M_MANL", "HLW_SCCYDL_M_M_M_SUM_M_MANL", "DBW_SCCYDL_M_M_M_SUM_M_MANL",
			"PXW_SCCYDL_M_M_M_SUM_M_MANL", "ZYW_SCCYDL_M_M_M_SUM_M_MANL", "SQW_SCCYDL_M_M_M_SUM_M_MANL" };

	/**
	 * 其中：发电厂用电量-累计-太阳能
	 */
	private static final String[] FDCYDL_LJ_TYN = new String[] { "KFE_SCCYDL_M_M_M_SUM_M_MANL",
			"YXX_SCCYDL_M_M_M_SUM_M_MANL" };

	/**
	 * 报表左上角信息设置
	 */
	static final String[] REPORT_DESC = new String[] { "CEC109-6000千瓦及以上电厂发电生产用电情况（年报）", "425005" };

	/**
	 * 更新IndicatorMapperReport4数据
	 */
	@Transactional
	public Boolean updateDatas(Long time) {
		Date date = new Date(time);
		Calendar cal = Calendar.getInstance();
		cal.setTime(date);
		// 设置用户选择的月份的当月为结束时间
		long endTime = time;
		// 查询IndicatorMapperReport4表中当前时间戳是否存在数据
		List<IndicatorMapperReport4> historyReports = reportRepository.findByTimeOrderByRowIndexAsc(endTime);
		List<IndicatorMapperReport4> reportData = null;
		// 如果存在数据,则需要保留之前页面手动录入的数据。
		if (historyReports.size() != 0) {
			reportData = setUpdateReportData(historyReports, endTime);
		} else {// 如果不存在数据，则直接更新数据
			reportData = new ArrayList<>();
			for (int i = 0; i < ALL_ROW_NAME.length; i++) {
				IndicatorMapperReport4 report = new IndicatorMapperReport4();
				// 设置时间
				report.setTime(endTime);
				// 设置行号
				report.setRowIndex(i + 1);
				String[] rowName = ALL_ROW_NAME[i].split("##");
				// 设置电压等级
				report.setZbmc(rowName[0]);
				// 设置指标代码
				report.setZbdm(rowName[1]);
				// 设置组织机构代码
				if (rowName[2].equals("null")) {
					report.setZzjgdm("");
				} else {
					report.setZzjgdm(rowName[2]);
				}
				report.setFdl_by(0.0);
				report.setFdl_lj(0.0);
				report.setCydl_by(0.0);
				report.setCydl_lj(0.0);
				report.setZjcydl_by(0.0);
				report.setZjcydl_lj(0.0);
				report.setZjcydlv_by(0.0);
				report.setZjcydlv_lj(0.0);
				reportData.add(report);
			}
			reportData = setUpdateReportData(reportData, endTime);
		}
		List<IndicatorMapperReport4> save = reportRepository.save(reportData);
		return save.size() > 0 ? true : false;
	}

	/**
	 * 从MapperData更新的数据，保存之前手动录入的数据。
	 * 
	 * @param historyReports
	 * @param beginTime
	 * @param endTime
	 * @param oldTime
	 * @return
	 */
	private List<IndicatorMapperReport4> setUpdateReportData(List<IndicatorMapperReport4> historyReports,
			Long endTime) {
		// 设置第1行数据
		// 1.设置计算厂用电率的发电量-本月
		List<String> indicatorCodes = Arrays.asList(JSCYD_FDL_BY_ALL);
		List<IndicatorMapperData> findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		double fdl_by = mapperDataListSum(findAll);
		// 2. 设置计算厂用电率的发电量-累计
		indicatorCodes = Arrays.asList(JSCYD_FDL_LJ_ALL);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		double fdl_lj = mapperDataListSum(findAll);
		// 3. 电厂生产全部耗用电量-本月
		indicatorCodes = Arrays.asList(SWDL_BY_ALL);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		double swdl_by = mapperDataListSum(findAll);
		// 4. 电厂生产全部耗用电量-累计
		indicatorCodes = Arrays.asList(SWDL_LJ_ALL);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		double swdl_lj = mapperDataListSum(findAll);
		// 5. 其中：发电厂用电量-本月
		indicatorCodes = Arrays.asList(FDCYDL_BY_ALL);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		double zjcydl_by = mapperDataListSum(findAll);
		// 6. 其中：发电厂用电量-累计
		indicatorCodes = Arrays.asList(FDCYDL_LJ_ALL);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		double zjcydl_lj = mapperDataListSum(findAll);
		historyReports = setUpdateColumnData(0, historyReports, fdl_by, fdl_lj, swdl_by, swdl_lj, zjcydl_by, zjcydl_lj);

		// 设置第2行数据
		// 1.设置计算厂用电率的发电量-本月
		indicatorCodes = Arrays.asList(JSCYD_FDL_BY_SD);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		fdl_by = mapperDataListSum(findAll);
		// 2. 设置计算厂用电率的发电量-累计
		indicatorCodes = Arrays.asList(JSCYD_FDL_LJ_SD);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		fdl_lj = mapperDataListSum(findAll);
		// 3. 电厂生产全部耗用电量-本月
		indicatorCodes = Arrays.asList(SWDL_BY_SD);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		swdl_by = mapperDataListSum(findAll);
		// 4. 电厂生产全部耗用电量-累计
		indicatorCodes = Arrays.asList(SWDL_LJ_SD);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		swdl_lj = mapperDataListSum(findAll);
		// 5. 其中：发电厂用电量-本月
		indicatorCodes = Arrays.asList(FDCYDL_BY_SD);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		zjcydl_by = mapperDataListSum(findAll);
		// 6. 其中：发电厂用电量-累计
		indicatorCodes = Arrays.asList(FDCYDL_LJ_SD);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		zjcydl_lj = mapperDataListSum(findAll);
		historyReports = setUpdateColumnData(1, historyReports, fdl_by, fdl_lj, swdl_by, swdl_lj, zjcydl_by, zjcydl_lj);

		// 设置第3行数据
		// 1.设置计算厂用电率的发电量-本月
		indicatorCodes = Arrays.asList(JSCYD_FDL_BY_HD);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		fdl_by = mapperDataListSum(findAll);
		// 2. 设置计算厂用电率的发电量-累计
		indicatorCodes = Arrays.asList(JSCYD_FDL_LJ_HD);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		fdl_lj = mapperDataListSum(findAll);
		// 3. 电厂生产全部耗用电量-本月
		indicatorCodes = Arrays.asList(SWDL_BY_HD);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		swdl_by = mapperDataListSum(findAll);
		// 4. 电厂生产全部耗用电量-累计
		indicatorCodes = Arrays.asList(SWDL_LJ_HD);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		swdl_lj = mapperDataListSum(findAll);
		// 5. 其中：发电厂用电量-本月
		indicatorCodes = Arrays.asList(FDCYDL_BY_HD);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		zjcydl_by = mapperDataListSum(findAll);
		// 6. 其中：发电厂用电量-累计
		indicatorCodes = Arrays.asList(FDCYDL_LJ_HD);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		zjcydl_lj = mapperDataListSum(findAll);
		historyReports = setUpdateColumnData(2, historyReports, fdl_by, fdl_lj, swdl_by, swdl_lj, zjcydl_by, zjcydl_lj);

		// 设置第4行数据
		// 1.设置计算厂用电率的发电量-本月
		indicatorCodes = Arrays.asList(JSCYD_FDL_BY_RM);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		fdl_by = mapperDataListSum(findAll);
		// 2. 设置计算厂用电率的发电量-累计
		indicatorCodes = Arrays.asList(JSCYD_FDL_LJ_RM);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		fdl_lj = mapperDataListSum(findAll);
		// 3. 电厂生产全部耗用电量-本月
		indicatorCodes = Arrays.asList(SWDL_BY_RM);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		swdl_by = mapperDataListSum(findAll);
		// 4. 电厂生产全部耗用电量-累计
		indicatorCodes = Arrays.asList(SWDL_LJ_RM);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		swdl_lj = mapperDataListSum(findAll);
		// 5. 其中：发电厂用电量-本月
		indicatorCodes = Arrays.asList(FDCYDL_BY_RM);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		zjcydl_by = mapperDataListSum(findAll);
		// 6. 其中：发电厂用电量-累计
		indicatorCodes = Arrays.asList(FDCYDL_LJ_RM);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		zjcydl_lj = mapperDataListSum(findAll);
		historyReports = setUpdateColumnData(3, historyReports, fdl_by, fdl_lj, swdl_by, swdl_lj, zjcydl_by, zjcydl_lj);

		// 设置第5行数据
		// 1.设置计算厂用电率的发电量-本月
		indicatorCodes = Arrays.asList(JSCYD_FDL_BY_RQ);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		fdl_by = mapperDataListSum(findAll);
		// 2. 设置计算厂用电率的发电量-累计
		indicatorCodes = Arrays.asList(JSCYD_FDL_LJ_RQ);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		fdl_lj = mapperDataListSum(findAll);
		// 3. 电厂生产全部耗用电量-本月
		indicatorCodes = Arrays.asList(SWDL_BY_RQ);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		swdl_by = mapperDataListSum(findAll);
		// 4. 电厂生产全部耗用电量-累计
		indicatorCodes = Arrays.asList(SWDL_LJ_RQ);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		swdl_lj = mapperDataListSum(findAll);
		// 5. 其中：发电厂用电量-本月
		indicatorCodes = Arrays.asList(FDCYDL_BY_RQ);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		zjcydl_by = mapperDataListSum(findAll);
		// 6. 其中：发电厂用电量-累计
		indicatorCodes = Arrays.asList(FDCYDL_LJ_RQ);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		zjcydl_lj = mapperDataListSum(findAll);
		historyReports = setUpdateColumnData(4, historyReports, fdl_by, fdl_lj, swdl_by, swdl_lj, zjcydl_by, zjcydl_lj);

		// 设置第8行数据
		// 1.设置计算厂用电率的发电量-本月
		indicatorCodes = Arrays.asList(JSCYD_FDL_BY_FD);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		fdl_by = mapperDataListSum(findAll);
		// 2. 设置计算厂用电率的发电量-累计
		indicatorCodes = Arrays.asList(JSCYD_FDL_LJ_FD);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		fdl_lj = mapperDataListSum(findAll);
		// 3. 电厂生产全部耗用电量-本月
		indicatorCodes = Arrays.asList(SWDL_BY_FD);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		swdl_by = mapperDataListSum(findAll);
		// 4. 电厂生产全部耗用电量-累计
		indicatorCodes = Arrays.asList(SWDL_LJ_FD);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		swdl_lj = mapperDataListSum(findAll);
		// 5. 其中：发电厂用电量-本月
		indicatorCodes = Arrays.asList(FDCYDL_BY_FD);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		zjcydl_by = mapperDataListSum(findAll);
		// 6. 其中：发电厂用电量-累计
		indicatorCodes = Arrays.asList(FDCYDL_LJ_FD);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		zjcydl_lj = mapperDataListSum(findAll);
		historyReports = setUpdateColumnData(7, historyReports, fdl_by, fdl_lj, swdl_by, swdl_lj, zjcydl_by, zjcydl_lj);

		// 设置第9行数据
		// 1.设置计算厂用电率的发电量-本月
		indicatorCodes = Arrays.asList(JSCYD_FDL_BY_TYN);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		fdl_by = mapperDataListSum(findAll);
		// 2. 设置计算厂用电率的发电量-累计
		indicatorCodes = Arrays.asList(JSCYD_FDL_LJ_TYN);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		fdl_lj = mapperDataListSum(findAll);
		// 3. 电厂生产全部耗用电量-本月
		indicatorCodes = Arrays.asList(SWDL_BY_TYN);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		swdl_by = mapperDataListSum(findAll);
		// 4. 电厂生产全部耗用电量-累计
		indicatorCodes = Arrays.asList(SWDL_LJ_TYN);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		swdl_lj = mapperDataListSum(findAll);
		// 5. 其中：发电厂用电量-本月
		indicatorCodes = Arrays.asList(FDCYDL_BY_TYN);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		zjcydl_by = mapperDataListSum(findAll);
		// 6. 其中：发电厂用电量-累计
		indicatorCodes = Arrays.asList(FDCYDL_LJ_TYN);
		findAll = findMapperDatas(indicatorCodes, endTime, endTime);
		zjcydl_lj = mapperDataListSum(findAll);
		historyReports = setUpdateColumnData(8, historyReports, fdl_by, fdl_lj, swdl_by, swdl_lj, zjcydl_by, zjcydl_lj);

		for (int i = 0; i < JSCYD_FDL_BY_ALL.length; i++) {
			IndicatorMapperData indicatorMapperData = null;
			// 1.设置计算厂用电率的发电量-本月
			fdl_by = 0.0;
			if (!JSCYD_FDL_BY_ALL[i].equals("")) {
				indicatorMapperData = mapperDataService.findByIndicatorCodeAndTime(JSCYD_FDL_BY_ALL[i], endTime);
				fdl_by = indicatorMapperData.getValue();
			}
			// 2. 设置计算厂用电率的发电量-累计
			fdl_lj = 0.0;
			if (!JSCYD_FDL_LJ_ALL[i].equals("")) {
				indicatorMapperData = mapperDataService.findByIndicatorCodeAndTime(JSCYD_FDL_LJ_ALL[i], endTime);
				fdl_lj = indicatorMapperData.getValue();
			}
			// 3. 电厂生产全部耗用电量-本月
			swdl_by = 0.0;
			if (!SWDL_BY_ALL[i].equals("")) {
				indicatorMapperData = mapperDataService.findByIndicatorCodeAndTime(SWDL_BY_ALL[i], endTime);
				swdl_by = indicatorMapperData.getValue();
			}
			// 4. 电厂生产全部耗用电量-累计
			swdl_lj = 0.0;
			if (!SWDL_LJ_ALL[i].equals("")) {
				indicatorMapperData = mapperDataService.findByIndicatorCodeAndTime(SWDL_LJ_ALL[i], endTime);
				swdl_lj = indicatorMapperData.getValue();
			}
			// 5. 其中：发电厂用电量-本月
			zjcydl_by = 0.0;
			if (!FDCYDL_BY_ALL[i].equals("")) {
				indicatorMapperData = mapperDataService.findByIndicatorCodeAndTime(FDCYDL_BY_ALL[i], endTime);
				zjcydl_by = indicatorMapperData.getValue();
			}
			// 6. 其中：发电厂用电量-累计
			zjcydl_lj = 0.0;
			if (!FDCYDL_LJ_ALL[i].equals("")) {
				indicatorMapperData = mapperDataService.findByIndicatorCodeAndTime(FDCYDL_LJ_ALL[i], endTime);
				zjcydl_lj = indicatorMapperData.getValue();
			}
			historyReports = setUpdateColumnData(10 + i, historyReports, fdl_by, fdl_lj, swdl_by, swdl_lj, zjcydl_by,
					zjcydl_lj);
		}

		return historyReports;
	}

	/**
	 * 设置MapperDataList查询方法
	 */
	private List<IndicatorMapperData> findMapperDatas(List<String> indicatorCodes, Long beginTime, Long endTime) {
		List<SearchFilter> searchFilters = new ArrayList<>();
		searchFilters.add(SearchFilter.in("indicatorCode", indicatorCodes));
		searchFilters.add(SearchFilter.ge("time", beginTime));
		searchFilters.add(SearchFilter.le("time", endTime));
		Specification<IndicatorMapperData> buildAndSpec = JpaSearchUtils.buildAndSpec(searchFilters);
		List<IndicatorMapperData> findAll = mapperDataService.findAll(buildAndSpec);
		return findAll;
	}

	/**
	 * 设置MapperDataList求和方法
	 */
	private double mapperDataListSum(List<IndicatorMapperData> mapperDataList) {
		return mapperDataList.stream().mapToDouble(x -> x.getValue()).summaryStatistics().getSum();
	}

	/**
	 * 设置每行的年初生产能力、年末生产能力、本年减少能力和发电量
	 */
	private List<IndicatorMapperReport4> setUpdateColumnData(Integer index, List<IndicatorMapperReport4> historyReports,
			Double fdl_by, Double fdl_lj, Double swdl_by, Double swdl_lj, Double zjcydl_by, Double zjcydl_lj) {
		// 1.计算厂用电率的发电量-本月
		historyReports.get(index).setFdl_by(fdl_by);
		// 2.计算厂用电率的发电量-累计
		historyReports.get(index).setFdl_lj(fdl_lj);
		// 3.电厂生产全部耗用电量-本月
		historyReports.get(index).setCydl_by(historyReports.get(index).getFdl_by() - swdl_by);
		// 4. 电厂生产全部耗用电量-累计
		historyReports.get(index).setCydl_lj(historyReports.get(index).getFdl_lj() - swdl_lj);
		// 5. 其中：发电厂用电量-本月
		historyReports.get(index).setZjcydl_by(zjcydl_by);
		// 6. 其中：发电厂用电量-累计
		historyReports.get(index).setZjcydl_lj(zjcydl_lj);
		// 7.发电厂用电率-本月
		if (fdl_by > 0.0) {
			historyReports.get(index).setZjcydlv_by(zjcydl_by / fdl_by * 100);
		} else {
			historyReports.get(index).setZjcydlv_by(0.0);
		}
		// 8.发电厂用电率-累计
		if (fdl_lj > 0.0) {
			historyReports.get(index).setZjcydlv_lj(zjcydl_lj / fdl_lj * 100);
		} else {
			historyReports.get(index).setZjcydlv_lj(0.0);
		}
		return historyReports;
	}

	/**
	 * 查询报表数据
	 * 
	 * @param time
	 * @return
	 */
	public List<IndicatorMapperReport4> findByTime(Long time) {
		return reportRepository.findByTimeOrderByRowIndexAsc(time);
	}

	/**
	 * 导出报表
	 */
	public HSSFWorkbook exportReport(List<IndicatorMapperReport4> reportDataList) {
		// 创建工作簿
		HSSFWorkbook workBook = new HSSFWorkbook();
		// 创建工作表 工作表的名字叫helloWorld
		HSSFSheet sheet = workBook.createSheet("工作表1");
		// 创建左上角固定报表描述表格
		sheet = creatRepotDesc(workBook, sheet, reportDataList.get(0).getTime());

		// 创建下方主报表
		sheet = creatMainRepot(workBook, sheet, reportDataList);
		return workBook;
	}

	/**
	 * 创建左上角报表
	 * 
	 * @param sheet
	 * @param time
	 * @return
	 */
	public HSSFSheet creatRepotDesc(HSSFWorkbook workBook, HSSFSheet sheet, Long time) {
		// 设置字体样式
		HSSFFont font = workBook.createFont();
		font.setColor(HSSFFont.COLOR_RED);

		// 创建第1行
		HSSFRow row_1 = sheet.createRow(0);
		HSSFCell row_1_cell_1 = row_1.createCell(0);
		row_1_cell_1.setCellValue("*");
		HSSFCell row_1_cell_2 = row_1.createCell(1);
		row_1_cell_2.setCellValue("");
		HSSFCell row_1_cell_3 = row_1.createCell(2);
		row_1_cell_3.setCellValue("1.本表头供系统识别使用；\r\n" + "2.各单位根据具体情况填写单位代码、单位名称、填报人；\r\n" + "3.本表头报告期必须与此报表报告期一致；\r\n"
				+ "4.指标代码必须按照规律编；\r\n" + "5.不可改动报表格式。");
		// 创建第2行
		HSSFRow row_2 = sheet.createRow(1);
		HSSFCell row_2_cell_1 = row_2.createCell(0);
		HSSFRichTextString richString = new HSSFRichTextString("广东粤电集团有限公司");
		richString.applyFont(font);
		row_2_cell_1.setCellValue(richString);
		HSSFCell row_2_cell_2 = row_2.createCell(1);
		row_2_cell_2.setCellValue("（单位名称）");

		// 创建第3行
		HSSFRow row_3 = sheet.createRow(2);
		HSSFCell row_3_cell_1 = row_3.createCell(0);
		richString = new HSSFRichTextString("9808000001");
		richString.applyFont(font);
		row_3_cell_1.setCellValue(richString);
		HSSFCell row_3_cell_2 = row_3.createCell(1);
		row_3_cell_2.setCellValue("（单位代码）");

		// 创建第4行
		HSSFRow row_4 = sheet.createRow(3);
		HSSFCell row_4_cell_1 = row_4.createCell(0);
		richString = new HSSFRichTextString("统计专责");
		richString.applyFont(font);
		row_4_cell_1.setCellValue(richString);
		HSSFCell row_4_cell_2 = row_4.createCell(1);
		row_4_cell_2.setCellValue("（填报人）");

		// 创建第5行
		HSSFRow row_5 = sheet.createRow(4);
		HSSFCell row_5_cell_1 = row_5.createCell(0);
		row_5_cell_1.setCellValue(REPORT_DESC[0]);
		HSSFCell row_5_cell_2 = row_5.createCell(1);
		row_5_cell_2.setCellValue("（表名）");

		// 创建第6行
		HSSFRow row_6 = sheet.createRow(5);
		HSSFCell row_6_cell_1 = row_6.createCell(0);
		row_6_cell_1.setCellValue(REPORT_DESC[1]);
		HSSFCell row_6_cell_2 = row_6.createCell(1);
		row_6_cell_2.setCellValue("（表号）");

		// 创建第7行
		HSSFRow row_7 = sheet.createRow(6);
		HSSFCell row_7_cell_1 = row_7.createCell(0);
		row_7_cell_1.setCellValue("1");
		HSSFCell row_7_cell_2 = row_7.createCell(1);
		row_7_cell_2.setCellValue("（期别）");

		// 创建第8行
		Calendar cal = Calendar.getInstance();
		Date date = new Date(time);
		cal.setTime(date);
		HSSFRow row_8 = sheet.createRow(7);
		HSSFCell row_8_cell_1 = row_8.createCell(0);
		row_8_cell_1.setCellValue(new HSSFRichTextString(String.valueOf(cal.get(Calendar.YEAR))));
		HSSFCell row_8_cell_2 = row_8.createCell(1);
		row_8_cell_2.setCellValue("年");
		HSSFCell row_8_cell_3 = row_8.createCell(2);
		row_8_cell_3.setCellValue(new HSSFRichTextString(String.valueOf(cal.get(Calendar.MONTH) + 1)));
		HSSFCell row_8_cell_4 = row_8.createCell(3);
		row_8_cell_4.setCellValue("月");
		HSSFCell row_8_cell_5 = row_8.createCell(4);
		row_8_cell_5.setCellValue("");

		sheet.addMergedRegion(new CellRangeAddress(0, 6, 2, 2));

		return sheet;
	}

	/**
	 * 创建下方主要表格
	 * 
	 * @param sheet
	 * @param reportDataList
	 * @return
	 */
	@SuppressWarnings("deprecation")
	public HSSFSheet creatMainRepot(HSSFWorkbook workBook, HSSFSheet sheet,
			List<IndicatorMapperReport4> reportDataList) {
		// 创建红色居中样式
		HSSFCellStyle cellStyle = workBook.createCellStyle();
		// 设置居中样式
		cellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);
		cellStyle.setAlignment(HSSFCellStyle.VERTICAL_CENTER);
		// 设置字体样式
		HSSFFont font = workBook.createFont();
		font.setColor(HSSFFont.COLOR_RED);
		cellStyle.setFont(font);

		// 创建第9行
		HSSFRow row_9 = sheet.createRow(8);
		HSSFCell row_9_cell_1 = row_9.createCell(0);
		row_9_cell_1.setCellValue("6000千瓦及以上电厂发电生产用电情况");

		// 创建第10行
		HSSFRow row_10 = sheet.createRow(9);
		HSSFCell row_10_cell_1 = row_10.createCell(0);
		row_10_cell_1.setCellValue("综合填报单位：  （章）");
		HSSFCell row_10_cell_2 = row_10.createCell(1);
		row_10_cell_2.setCellValue("");
		HSSFCell row_10_cell_3 = row_10.createCell(2);
		row_10_cell_3.setCellValue("");
		HSSFCell row_10_cell_4 = row_10.createCell(3);
		row_10_cell_4.setCellValue("");
		HSSFCell row_10_cell_5 = row_10.createCell(4);
		row_10_cell_5.setCellValue("");
		HSSFCell row_10_cell_6 = row_10.createCell(5);
		row_10_cell_6.setCellValue("YYYY");
		HSSFCell row_10_cell_7 = row_10.createCell(6);
		row_10_cell_7.setCellValue("");
		HSSFCell row_10_cell_8 = row_10.createCell(7);
		row_10_cell_8.setCellValue("");
		HSSFCell row_10_cell_9 = row_10.createCell(8);
		row_10_cell_9.setCellValue("");
		HSSFCell row_10_cell_10 = row_10.createCell(9);
		row_10_cell_10.setCellValue("");
		HSSFCell row_10_cell_11 = row_10.createCell(9);
		row_10_cell_11.setCellValue("单位：万千瓦时、%");

		// 创建第11行
		HSSFRow row_11 = sheet.createRow(10);
		HSSFCell row_11_cell_1 = row_11.createCell(0);
		row_11_cell_1.setCellValue("指标名称");
		HSSFCell row_11_cell_2 = row_11.createCell(1);
		row_11_cell_2.setCellValue("指标代码");
		HSSFCell row_11_cell_3 = row_11.createCell(2);
		row_11_cell_3.setCellValue("组织机构代码");
		HSSFCell row_11_cell_4 = row_11.createCell(3);
		row_11_cell_4.setCellValue("计算厂用电率的发电量");
		HSSFCell row_11_cell_6 = row_11.createCell(5);
		row_11_cell_6.setCellValue("电厂生产全部耗用电量");
		HSSFCell row_11_cell_8 = row_11.createCell(7);
		row_11_cell_8.setCellValue("其中：发电厂用电量");
		HSSFCell row_11_cell_10 = row_11.createCell(9);
		row_11_cell_10.setCellValue("发电厂用电率");

		// 创建第12行
		HSSFRow row_12 = sheet.createRow(11);
		HSSFCell row_12_cell_4 = row_12.createCell(3);
		row_12_cell_4.setCellValue("本月");
		HSSFCell row_12_cell_5 = row_12.createCell(4);
		row_12_cell_5.setCellValue("累计");
		HSSFCell row_12_cell_6 = row_12.createCell(5);
		row_12_cell_6.setCellValue("本月");
		HSSFCell row_12_cell_7 = row_12.createCell(6);
		row_12_cell_7.setCellValue("累计");
		HSSFCell row_12_cell_8 = row_12.createCell(7);
		row_12_cell_8.setCellValue("本月");
		HSSFCell row_12_cell_9 = row_12.createCell(8);
		row_12_cell_9.setCellValue("累计");
		HSSFCell row_12_cell_10 = row_12.createCell(9);
		row_12_cell_10.setCellValue("本月");
		HSSFCell row_12_cell_11 = row_12.createCell(10);
		row_12_cell_11.setCellValue("累计");

		// 创建第13行
		HSSFRow row_13 = sheet.createRow(12);
		HSSFCell row_13_cell_1 = row_13.createCell(0);
		row_13_cell_1.setCellValue("甲");
		HSSFCell row_13_cell_2 = row_13.createCell(1);
		row_13_cell_2.setCellValue("1");
		HSSFCell row_13_cell_3 = row_13.createCell(2);
		row_13_cell_3.setCellValue("2");
		HSSFCell row_13_cell_4 = row_13.createCell(3);
		row_13_cell_4.setCellValue("3");
		HSSFCell row_13_cell_5 = row_13.createCell(4);
		row_13_cell_5.setCellValue("4");
		HSSFCell row_13_cell_6 = row_13.createCell(5);
		row_13_cell_6.setCellValue("5");
		HSSFCell row_13_cell_7 = row_13.createCell(6);
		row_13_cell_7.setCellValue("6");
		HSSFCell row_13_cell_8 = row_13.createCell(7);
		row_13_cell_8.setCellValue("7");
		HSSFCell row_13_cell_9 = row_13.createCell(8);
		row_13_cell_9.setCellValue("8");
		HSSFCell row_13_cell_10 = row_13.createCell(9);
		row_13_cell_10.setCellValue("9");
		HSSFCell row_13_cell_11 = row_13.createCell(10);
		row_13_cell_11.setCellValue("10");

		for (IndicatorMapperReport4 report : reportDataList) {
			HSSFRow row = sheet.createRow(report.getRowIndex() + ROW_INDEX);
			// 设置第1列
			HSSFCell cell_1 = row.createCell(0);
			cell_1.setCellValue(report.getZbmc());
			// 设置第2列
			HSSFCell cell_2 = row.createCell(1);
			cell_2.setCellValue(report.getZbdm());
			// 设置第3列
			HSSFCell cell_3 = row.createCell(2);
			cell_3.setCellValue(report.getZzjgdm());
			// 设置第4列
			HSSFCell cell_4 = row.createCell(3);
			cell_4.setCellValue(report.getFdl_by());
			// 设置第5列
			HSSFCell cell_5 = row.createCell(4);
			cell_5.setCellValue(report.getFdl_lj());
			// 设置第6列
			HSSFCell cell_6 = row.createCell(5);
			cell_6.setCellValue(report.getCydl_by());
			// 设置第7列
			HSSFCell cell_7 = row.createCell(6);
			cell_7.setCellValue(report.getCydl_lj());
			// 设置第8列
			HSSFCell cell_8 = row.createCell(7);
			cell_8.setCellValue(report.getZjcydl_by());
			// 设置第9列
			HSSFCell cell_9 = row.createCell(8);
			cell_9.setCellValue(report.getZjcydl_lj());
			// 设置第10列
			HSSFCell cell_10 = row.createCell(9);
			cell_10.setCellValue(report.getZjcydlv_by());
			// 设置第11列
			HSSFCell cell_11 = row.createCell(10);
			cell_11.setCellValue(report.getZjcydlv_lj());
		}

		// 合并6000千瓦及以上电厂发电生产情况单元格
		sheet.addMergedRegion(new CellRangeAddress(8, 8, 0, 15));
		// 合并电厂名称单元格
		sheet.addMergedRegion(new CellRangeAddress(10, 11, 0, 0));
		// 合并指标代码单元格
		sheet.addMergedRegion(new CellRangeAddress(10, 11, 1, 1));
		// 合并组织结构代码单元格
		sheet.addMergedRegion(new CellRangeAddress(10, 11, 2, 2));
		// 合并计算厂用电率的发电量单元格
		sheet.addMergedRegion(new CellRangeAddress(10, 10, 3, 4));
		// 合并电厂生产全部耗用电量单元格
		sheet.addMergedRegion(new CellRangeAddress(10, 10, 5, 6));
		// 合并其中：发电厂用电量单元格
		sheet.addMergedRegion(new CellRangeAddress(10, 10, 7, 8));
		// 合并发电厂用电率单元格
		sheet.addMergedRegion(new CellRangeAddress(10, 10, 9, 10));
		return sheet;
	}

}
